import pytest

from api.ihrm_api import IhrmApi
from common.header_util import HeaderUtil
from common.ihrm_assert import Ihrmcommon
from common.read_data import read_ihrmDelete


class TestIhrmSearch:
    # 定义类属性
    header = None

    @classmethod
    def setup_class(cls):
        cls.header = HeaderUtil.loginApi()

    @pytest.mark.parametrize("emp_id, state_code, success, code, message", read_ihrmDelete())
    def test(self, emp_id, state_code, success, code, message):
        delete_result = IhrmApi.delete(emp_id, self.header)
        Ihrmcommon.uid_assert(delete_result, state_code, success, code, message)
